<?php

namespace User\Controller\Plugin;

use User\Model\Entity\ModuleSettings;
use Zend\Mvc\Controller\Plugin\AbstractPlugin;

class ModuleSettingsPlugin extends AbstractPlugin {
	/**
	 * @var ModuleSettings
	 */
	protected $moduleSettings;
	
	/**
	 * @return ModuleSettings
	 */
	public function getModuleSettings() {
		return $this->moduleSettings;
	}

	/**
	 * @param ModuleSettings $moduleSettings
	 */
	public function setModuleSettings(ModuleSettings $moduleSettings) {
		$this->moduleSettings = $moduleSettings;
		return $this;
	}

	/**
	 * @return string
	 */
	public function getLoginRoute() {
		return $this->getModuleSettings()->getLoginRoute();
	}
	
	/**
	 * @return string
	 */
	public function getRedirectRouteLogin() {
		return $this->getModuleSettings()->getRedirectRouteLogin();
	}

	/**
	 * @return string
	 */
	public function getRedirectRouteLogout() {
		return $this->getModuleSettings()->getRedirectRouteLogout();
	}

	/**
	 * @return bool
	 */
	public function getLoginAfterRegistration() {
		return $this->getModuleSettings()->getLoginAfterRegistration();
	}

	/**
	 * @return bool
	 */
	public function getRegistrationEnable() {
		return $this->getModuleSettings()->getRegistrationEnable();
	}

	/**
	 * @return bool
	 */
	public function getRegistrationUseFormCaptcha() {
		return $this->getModuleSettings()->getRegistrationUseFormCaptcha();
	}
}